package com.yc.sole.erp.request;

import com.yc.sole.framework.validate.SaveGroup;
import com.yc.sole.framework.validate.UpdateGroup;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * @author yizuomin
 * @date 2024/1/15 13:41
 **/
@Data
public class OutputReq {

    /**
     * id
     */
    @NotNull(groups = {UpdateGroup.class})
    private Long id;
    /**
     * 生产id
     */
    @NotNull(groups = {SaveGroup.class, UpdateGroup.class})
    private Long produceId;
    /**
     * 生产数量
     */
    @Min(value = 1, groups = {SaveGroup.class, UpdateGroup.class})
    @NotNull(groups = {SaveGroup.class, UpdateGroup.class})
    private Integer quantity;
    /**
     * 班组id
     */
    @NotNull(groups = {SaveGroup.class, UpdateGroup.class})
    private Long shiftId;
    /**
     * 生产日期
     */
    @Length(max = 10, groups = {SaveGroup.class, UpdateGroup.class})
    @NotBlank(groups = {SaveGroup.class, UpdateGroup.class})
    private String outputDate;
}
